﻿@model ChannelModel

<div class="fly-panel  fly-column">
    <div class="layui-container">
        <div class="layui-col-md10">
            <ul class="layui-nav">
                @foreach (var item in Model.Channels)
                {
                    <li class="layui-nav-item">
                        @if (item.Channels.Count <= 0)
                        {
                            <a class="@(item.Id==Model.Id?"layui-this":"")" href="@Url.Content("~/Article/Index/"+item.Code)">@item.Name</a>
                        }
                        else
                        {
                            <a class="@(item.Id==Model.ParentId?"layui-this":"")" href="javascript:;">@item.Name</a>
                            <dl class="layui-nav-child">
                                @foreach (var childItem in item.Channels)
                                {
                                    <dd class="@(childItem.Id==Model.Id?"layui-this":"")"><a href="@Url.Content("~/Article/Index/"+childItem.Code)">@childItem.Name</a></dd>
                                }
                            </dl>
                        }
                    </li>
                }

            </ul>

        </div>
        <div class="layui-col-md2">
            <div class="fly-column-right layui-hide-xs">
                <span class="fly-search"><i class="layui-icon">&#xe615;</i></span>
                @Html.ActionLink("发表文章", "Add", "Article", null, new { @class = "layui-btn" })
            </div>
        </div>
    </div>
</div>
